#include "formeditcategory.h"


FormEditCategory::FormEditCategory(const QString &originalText, QWidget *parent) : QDialog(parent), ui(new Ui::FormEditCategory) {
    ui->setupUi(this);
	ui->txtCategory->setText(originalText);
}

FormEditCategory::~FormEditCategory() {
    delete ui;
}

bool FormEditCategory::getText(QString *str) {
	ui->txtCategory->selectAll();
	ui->txtCategory->setFocus();
    if (exec() == QDialog::Accepted) {
        str->clear();
        str->append(ui->txtCategory->text());
        return true;
    }
    else
        return false;
}
